package bud.taskmanager.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import bud.taskmanager.user.dao.UserDao;
import bud.taskmanager.user.dto.User;

@Service(value = "UserService")
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserDao userDao;

	@Override
	public void createUser(User user) {
		userDao.createUser(user);
	}

	@Override
	public List<User> findAllUsers() {
		return userDao.findAllUsers();
	}

	@Override
	public void deleteUser(int id) {
		userDao.deleteUser(id);
	}

	@Override
	public User findUser(int id) {
		return userDao.findUser(id);
	}

	@Override
	public void updateUser(User user) {
		userDao.updateUSer(user);
	}

}
